/*
 * p1482.cpp
 *
 *  Created on: 2013-10-25
 *      Author: zy
 */
#include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<algorithm>
using namespace std;
long long SG(long long x)
{
	return x % 2 == 0 ? x / 2 : SG(x / 2);
}
int main()
{
	int T;
	cin >> T;
	while (T--)
	{
		int n;
		long long a, v = 0;
		cin >> n;
		for (int i = 0; i < n; i++)
		{
			cin >> a;
			v ^= SG(a);
		}
		if (v)
			puts("YES");
		else
			puts("NO");
	}
	return 0;
}
